package xin.baizhiedu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * SELECT
 * 	A."MANU_CODE",A."MANU_NAME",A."MANU_TYPE_NAME",A."MANU_TYPE",A."PID_NAME",A."EXT" ,
 * 	B.JOB_TOTAL
 * FROM
 * 	(
 * 	SELECT
 * 		ut.MANU_CODE,
 * 		ut.MANU_NAME,
 * 		ut.MANU_TYPE_NAME,
 * 		ut.MANU_TYPE,
 * 		A.MANU_NAME AS PID_NAME,
 * 		ut.EXT
 * 	FROM
 * 		T_EQUI_MANUFACTUREUNIT ut
 * 		LEFT JOIN ( SELECT MANU_NAME, MANU_ID FROM T_EQUI_MANUFACTUREUNIT ) A ON A.MANU_ID = ut.MANU_PID
 * 	WHERE
 * 		ut.EXT <> '{"mac":""}'
 * 		AND ut.EXT <> '{}'
 * 		AND ut.EXT IS NOT NULL
 * 		AND ut.MANU_TYPE IN ( 'BOM.t_equi_manufactureunit.manu_type.workshop_station.003', 'BOM.t_equi_manufactureunit.manu_type.workshop_station.001' )
 * 		AND ut.paty_id IN (
 * 		SELECT
 * 			t1.paty_id
 * 		FROM
 * 			T_BASE_PARTY t1
 * 		WHERE
 * 			t1.paty_type LIKE '%PARTY.t_base_party.patytype.005%' START WITH t1.paty_id = 1542161592662027 CONNECT BY PRIOR t1.paty_id = t1.paty_pid
 * 		)
 * 		AND ut.manu_type IN ( 'BOM.t_equi_manufactureunit.manu_type.workshop_station.001', 'BOM.t_equi_manufactureunit.manu_type.workshop_station.002', 'BOM.t_equi_manufactureunit.manu_type.workshop_station.003' )
 * 	ORDER BY
 * 		ut.MANU_TYPE
 * 	) A
 * 	LEFT JOIN (
 * 	SELECT
 * 		JOB_EQCODE,
 * 		COUNT( JOB_CODE ) AS JOB_TOTAL,
 * 		EXT,
 * 		MANU_TYPE,
 * 		MANU_TYPE_NAME
 * 	FROM
 * 		(
 * 		SELECT
 * 			B.JOB_EQCODE,
 * 			A.JOB_CODE,
 * 			UT.EXT,
 * 			UT.MANU_TYPE,
 * 			UT.MANU_TYPE_NAME
 * 		FROM
 * 			T_PLAN_JOB A,
 * 			T_PLAN_JOB B,
 * 			T_EQUI_MANUFACTUREUNIT ut
 * 		WHERE
 * 			A.JOB_ID = B.JOB_PID
 * 			AND A.STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.014'
 * 			AND A.JOB_TYPE = 'PLAN.t_plan_Job.Job_Type.002'
 * 			AND A.JOB_DIVISION = '1'
 * 			AND B.JOB_EQCODE IS NOT NULL
 * 			AND ut.EXT <> '{"mac":""}'
 * 			AND ut.EXT <> '{}'
 * 			AND ut.EXT IS NOT NULL
 * 			AND ut.MANU_CODE = B.JOB_EQCODE
 * 		GROUP BY
 * 			B.JOB_EQCODE,
 * 			A.JOB_CODE,
 * 			ut.EXT,
 * 			ut.MANU_TYPE,
 * 			MANU_TYPE_NAME
 * 		)
 * 	WHERE
 * 		1 = 1
 * 	GROUP BY
 * 		JOB_EQCODE,
 * 		EXT,
 * 		MANU_TYPE,
 * 	MANU_TYPE_NAME
 * 	) B ON A.MANU_CODE = B.JOB_EQCODE
 */
@Data
@TableName(value = "QG_JOB_WORKSTATION", autoResultMap = true)
public class qgJobWorkstation implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 工位编号
     */
    @TableField(value = "MANU_CODE")
    private String manuCode;

    /**
     * 工位名称
     */
    @TableField(value = "MANU_NAME")
    private String manuName;

    /**
     * 工位类别名字
     */
    @TableField(value = "MANU_TYPE_NAME")
    private String manuTypeName;

    /**
     * 工位类别名称
     */
    @TableField(value = "MANU_TYPE")
    private String manuType;

    /**
     * 工位父节点
     */
    @TableField(value = "PID_NAME")
    private String pidName;

    /**
     * Mac 地址
     */
    @TableField(value = "EXT")
    private String ext;

    /**
     * 工位数量
     */
    @TableField(value = "JOB_TOTAL")
    private String jobTotal;

}
